package com.video.main_video.controller;

import com.video.main_video.dao.request.register.RegisterRequest;
import com.video.main_video.dao.response.register.RegisterResponse;
import com.video.main_video.manager.handle.register.RegisterManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/")
public class RegisterController {

    @Autowired
    private RegisterManager registerManger;

    @PostMapping("register")
    public RegisterResponse login(@RequestBody RegisterRequest req, HttpServletResponse res){
        return registerManger.handler(req);
    }

}
